<?php
class CV_ORM_Schema_Reader_Filter{
	protected $schema;
	protected $rules;
	function __construct( $schema, $rules ){
		$this->schema = $schema;
		$this->rules = $rules;
	}
	public function getDatabaseNames(){
		return array_intersect( $this->rules, $this->schema->getDatabaseNames() );
	}
	public function getTableNames( $database ){
		return $this->schema->getTableNames( $database );
	}
	public function getColumnNames( $database, $table ){
		return $this->schema->getColumnNames( $database, $table );
	}
	public function getPrimaryKey( $database, $table ){
		return $this->schema->getPrimaryKey( $database, $table );
	}
}